<div class="dux-body">
    <div class="dux-box">
        <div class="box-side">
            <div class="am-panel am-panel-default dux-panel">
                <ul class="am-nav">
                    <li class="am-active"><a href="{url('index')}">基本设置</a></li>
                    <li><a href="{url('apply')}">申请设置</a></li>
                    <li><a href="{url('level')}">升级设置</a></li>
                    <li><a href="{url('qrcode')}">二维码设置</a></li>
                    <li><a href="{url('notice')}">消息设置</a></li>
                </ul>
            </div>
        </div>
        <div class="box-body">
            <div class="am-panel am-panel-default dux-panel">
                <div class="am-panel-hd">基本配置</div>
                <div class="am-panel-bd">
                    <form class="am-form  am-form-horizontal dux-form" method="post" action="{url()}"
                          data-dux="form-bind">
                        <fieldset>
                            <div class="am-form-group">
                                <label class="am-u-md-2 am-u-sm-12 am-form-label">分销开关</label>
                                <div class="am-u-md-10 am-u-sm-12">
                                    <div class="am-g">
                                        <label class="am-radio-inline">
                                            <!--if{$info['sale_status']}-->
                                            <input name="sale_status" value="1" checked="checked" type="radio">
                                            <!--{else}-->
                                            <input name="sale_status" value="1" type="radio">
                                            <!--{/if}-->
                                            开启
                                        </label>

                                        <label class="am-radio-inline">
                                            <!--if{!$info['sale_status']}-->
                                            <input name="sale_status" checked="checked" value="0" type="radio">
                                            <!--{else}-->
                                            <input name="sale_status" value="0" type="radio">
                                            <!--{/if}-->
                                            关闭
                                        </label></div>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-md-2 am-u-sm-12 am-form-label">分销层级</label>
                                <div class="am-u-md-10 am-u-sm-12">
                                    <select name="sale_level">
                                        <!--for{$i = 1; $i < 4; $i++}-->
                                        <option value="{$i}" {$info.sale_level == $i ? 'selected' : ''} >{$i}级分销</option>
                                        <!--{/for}-->
                                    </select>
                                    <div class="am-form-help">分销佣金比例请在分销等级中设置</div>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label class="am-u-md-2 am-u-sm-12 am-form-label">层级名称</label>
                                <div class="am-u-md-10 am-u-sm-12">
                                    <input name="sale_level_name" value="{$info.sale_level_name}" type="text">
                                    <div class="am-form-help">分销层级名称，多个名称用,隔开，依次对应各个层级</div>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label class="am-u-md-2 am-u-sm-12 am-form-label">分销内购</label>
                                <div class="am-u-md-10 am-u-sm-12">
                                    <div class="am-g">
                                        <label class="am-radio-inline">
                                            <!--if{$info['sale_purchase']}-->
                                            <input name="sale_purchase" value="1" checked="checked" type="radio">
                                            <!--{else}-->
                                            <input name="sale_purchase" value="1" type="radio">
                                            <!--{/if}-->
                                            开启
                                        </label>

                                        <label class="am-radio-inline">
                                            <!--if{!$info['sale_purchase']}-->
                                            <input name="sale_purchase" checked="checked" value="0" type="radio">
                                            <!--{else}-->
                                            <input name="sale_purchase" value="0" type="radio">
                                            <!--{/if}-->
                                            关闭
                                        </label></div>
                                    <div class="am-form-help">开启分销内购，分销商自己购买商品，享受分销层级提成</div>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <div class="am-u-sm-offset-12 am-u-md-offset-2">
                                    <button class="am-btn am-btn-primary" type="submit">保存</button>
                                </div>
                            </div>
                        </fieldset>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
